package com.chencong.online.function;

import com.chencong.online.bean.ReceiptEventBean;
import org.apache.flink.api.common.functions.MapFunction;

/**
 * @program: user-behavior-analysis-online
 * @ClassName ReceiptEventMapFunc
 * @description:格式化到账事件
 * @author: chencong
 * @create: 2022-01-06 13:52
 **/
public class ReceiptEventMapFunc implements MapFunction<String, ReceiptEventBean> {
    @Override
    public ReceiptEventBean map(String value) throws Exception {
        String[] fields = value.split(",");
        return new ReceiptEventBean(fields[0], fields[1], new Long(fields[2]));
    }
}
